import React from 'react';

export interface IResourcesContext {
  curRes: any;
  prefixCls: string;
  resourCurrent: number;
  commonDispatch: React.Dispatch<any>;
}

const INIT_RESOURCES_VALUE: IResourcesContext = {
  prefixCls: '',
  curRes: {},
  resourCurrent: 0,
  commonDispatch: () => {},
};

export const ResourcesContext = React.createContext<IResourcesContext>(
  INIT_RESOURCES_VALUE,
);
